package com.fand.platform.authority.dao;

import java.util.List;
import java.util.Map;

import com.fand.dto.PaginationDto;
import com.fand.persistent.builder.ModelArgs;
import com.fand.persistent.builder.ModelBuilder;
import com.fand.persistent.builder.ModelBuilderUtils;
import com.fand.persistent.support.DaoJdbcSupport;
import com.fand.platform.authority.dto.ResourceDto;
import com.fand.platform.authority.dto.ResourceLoDto;
import com.fand.platform.authority.dto.ResourceVaRuTrMoDto;
import com.fand.platform.authority.dto.ResourceVaRuTrMoLoDto;

/**
 * 资源
 * 
 * @author yaoHT
 * 
 */
public class ResourceJdbcDao extends DaoJdbcSupport implements ResourceDao {

	@Override
	public int insertResourceBy1(ResourceDto insertResource, String... insertProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResource, insertProperties));
		return this.update("authority/resource/insertResourceBy1", modelBuilder.build());
	}

	@Override
	public int insertResourceBy1_1(ResourceDto insertResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResource));
		return this.update("authority/resource/insertResourceBy1", modelBuilder.build());
	}

	@Override
	public int insertResourceBy2(ResourceDto insertResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResource));

		return this.update("authority/resource/insertResourceBy2", modelBuilder.build());
	}

	@Override
	public int deleteResourceBy1(ResourceDto deleteResource, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResource,
				whereEqProperties));

		return this.update("authority/resource/deleteResourceBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceBy1_1(ResourceDto deleteResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResource));

		return this.update("authority/resource/deleteResourceBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceBy2(ResourceDto deleteResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResource));

		return this.update("authority/resource/deleteResourceBy2", modelBuilder.build());
	}

	@Override
	public int updateResourceBy1(ResourceDto updateResource, String[] updateProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.UPDATE,
				updateResource, updateProperties), new ModelArgs(updateResource, whereEqProperties));

		return this.update("authority/resource/updateResourceBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceBy1_1(ResourceDto updateResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(updateResource));

		return this.update("authority/resource/updateResourceBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceBy2(ResourceDto updateResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(updateResource));

		return this.update("authority/resource/updateResourceBy2", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy1ForObject(Class<R> requiredType, ResourceDto selectResource, String objectId,
			String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource,
				whereEqProperties));

		return this.selectForObject(requiredType, "authority/resource/selectResourceBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy1_1ForObject(Class<R> requiredType, ResourceDto selectResource, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForObject(requiredType, "authority/resource/selectResourceBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy2ForObject(Class<R> requiredType, ResourceDto selectResource, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForObject(requiredType, "authority/resource/selectResourceBy2ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy1ForObjectList(Class<R> requiredType, ResourceDto selectResource,
			String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource,
				whereEqProperties));

		return this.selectForObjectList(requiredType, "authority/resource/selectResourceBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy1_1ForObjectList(Class<R> requiredType, ResourceDto selectResource,
			String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForObjectList(requiredType, "authority/resource/selectResourceBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy2ForObjectList(Class<R> requiredType, ResourceDto selectResource,
			String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForObjectList(requiredType, "authority/resource/selectResourceBy2ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy1ForMappedObject(Class<R> mappedClass, ResourceDto selectResource,
			String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObject(mappedClass, "authority/resource/selectResourceBy1ForMappedObjectList",
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy1_1ForMappedObject(Class<R> mappedClass, ResourceDto selectResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForMappedObject(mappedClass, "authority/resource/selectResourceBy1ForMappedObjectList",
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceBy2ForMappedObject(Class<R> mappedClass, ResourceDto selectResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForMappedObject(mappedClass, "authority/resource/selectResourceBy2ForMappedObjectList",
				modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy1ForMappedObjectList(Class<R> mappedClass, ResourceDto selectResource,
			String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObjectList(mappedClass,
				"authority/resource/selectResourceBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy1_1ForMappedObjectList(Class<R> mappedClass, ResourceDto selectResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForMappedObjectList(mappedClass,
				"authority/resource/selectResourceBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceBy2ForMappedObjectList(Class<R> mappedClass, ResourceDto selectResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResource));

		return this.selectForMappedObjectList(mappedClass,
				"authority/resource/selectResourceBy2ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> PaginationDto<R> paginationResourceBy1ForMappedObjectList(Class<R> mappedClass,
			ResourceDto paginationResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(paginationResource));

		return this.paginationForMappedObjectList(mappedClass, "authority/resource/selectResourceBy1ForObject",
				"authority/resource/selectResourceBy1ForMappedObjectList", paginationResource.getPaginationNo(),
				paginationResource.getPaginationSize(), modelBuilder.build());
	}

	@Override
	public PaginationDto<Map<String, Object>> paginationResourceBy1ForMapList(ResourceDto paginationResource) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(paginationResource));

		return this.paginationForMapList("authority/resource/selectResourceBy1ForObject",
				"authority/resource/selectResourceBy1ForMappedObjectList", paginationResource.getPaginationNo(),
				paginationResource.getPaginationSize(), modelBuilder.build());
	}

	@Override
	public int insertResourceLoBy1(ResourceLoDto insertResourceLo, String... insertProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResourceLo, insertProperties));
		return this.update("authority/resourceLo/insertResourceLoBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceLoBy1(ResourceLoDto deleteResourceLo, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResourceLo,
				whereEqProperties));

		return this.update("authority/resourceLo/deleteResourceLoBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceLoBy1(ResourceLoDto updateResourceLo, String[] updateProperties,
			String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.UPDATE,
				updateResourceLo, updateProperties), new ModelArgs(updateResourceLo, whereEqProperties));

		return this.update("authority/resourceLo/updateResourceLoBy1", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceLoBy1ForObject(Class<R> requiredType, ResourceLoDto selectResourceLo,
			String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceLo,
				whereEqProperties));

		return this.selectForObject(requiredType, "authority/resourceLo/selectResourceLoBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceLoBy1ForObjectList(Class<R> requiredType, ResourceLoDto selectResourceLo,
			String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceLo,
				whereEqProperties));

		return this.selectForObjectList(requiredType, "authority/resourceLo/selectResourceLoBy1ForObject", objectId,
				modelBuilder.build());
	}

	@Override
	public <R> R selectResourceLoBy1ForMappedObject(Class<R> mappedClass, ResourceLoDto selectResourceLo,
			String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceLo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObject(mappedClass,
				"authority/resourceLo/selectResourceLoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceLoBy1ForMappedObjectList(Class<R> mappedClass, ResourceLoDto selectResourceLo,
			String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceLo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObjectList(mappedClass,
				"authority/resourceLo/selectResourceLoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public int insertResourceVaRuTrMoBy1(ResourceVaRuTrMoDto insertResourceVaRuTrMo, String... insertProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResourceVaRuTrMo, insertProperties));
		return this.update("authority/resourceVaRuTrMo/insertResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int insertResourceVaRuTrMoBy1_1(ResourceVaRuTrMoDto insertResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResourceVaRuTrMo));
		return this.update("authority/resourceVaRuTrMo/insertResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int insertResourceVaRuTrMoBy2(ResourceVaRuTrMoDto insertResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResourceVaRuTrMo));

		return this.update("authority/resourceVaRuTrMo/insertResourceVaRuTrMoBy2", modelBuilder.build());
	}

	@Override
	public int deleteResourceVaRuTrMoBy1(ResourceVaRuTrMoDto deleteResourceVaRuTrMo, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResourceVaRuTrMo,
				whereEqProperties));

		return this.update("authority/resourceVaRuTrMo/deleteResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceVaRuTrMoBy1_1(ResourceVaRuTrMoDto deleteResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResourceVaRuTrMo));

		return this.update("authority/resourceVaRuTrMo/deleteResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceVaRuTrMoBy2(ResourceVaRuTrMoDto deleteResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResourceVaRuTrMo));

		return this.update("authority/resourceVaRuTrMo/deleteResourceVaRuTrMoBy2", modelBuilder.build());
	}

	@Override
	public int updateResourceVaRuTrMoBy1(ResourceVaRuTrMoDto updateResourceVaRuTrMo, String[] updateProperties,
			String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.UPDATE,
				updateResourceVaRuTrMo, updateProperties), new ModelArgs(updateResourceVaRuTrMo, whereEqProperties));

		return this.update("authority/resourceVaRuTrMo/updateResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceVaRuTrMoBy1_1(ResourceVaRuTrMoDto updateResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(updateResourceVaRuTrMo));

		return this.update("authority/resourceVaRuTrMo/updateResourceVaRuTrMoBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceVaRuTrMoBy2(ResourceVaRuTrMoDto updateResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(updateResourceVaRuTrMo));

		return this.update("authority/resourceVaRuTrMo/updateResourceVaRuTrMoBy2", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy1ForObject(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo,
				whereEqProperties));

		return this.selectForObject(requiredType, "authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject",
				objectId, modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy1_1ForObject(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForObject(requiredType, "authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject",
				objectId, modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy2ForObject(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForObject(requiredType, "authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy2ForObject",
				objectId, modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy1ForObjectList(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo,
				whereEqProperties));

		return this.selectForObjectList(requiredType,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject", objectId, modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy1_1ForObjectList(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForObjectList(requiredType,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject", objectId, modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy2ForObjectList(Class<R> requiredType,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String objectId) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForObjectList(requiredType,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy2ForObject", objectId, modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy1ForMappedObject(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObject(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy1_1ForMappedObject(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForMappedObject(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoBy2ForMappedObject(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForMappedObject(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy2ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy1ForMappedObjectList(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo, String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObjectList(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy1_1ForMappedObjectList(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForMappedObjectList(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoBy2ForMappedObjectList(Class<R> mappedClass,
			ResourceVaRuTrMoDto selectResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMo));

		return this.selectForMappedObjectList(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy2ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> PaginationDto<R> paginationResourceVaRuTrMoBy1ForMappedObjectList(Class<R> mappedClass,
			ResourceVaRuTrMoDto paginationResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils
				.newModelBuilder(new ModelArgs(paginationResourceVaRuTrMo));

		return this.paginationForMappedObjectList(mappedClass,
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject",
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList",
				paginationResourceVaRuTrMo.getPaginationNo(), paginationResourceVaRuTrMo.getPaginationSize(),
				modelBuilder.build());
	}

	@Override
	public PaginationDto<Map<String, Object>> paginationResourceVaRuTrMoBy1ForMapList(
			ResourceVaRuTrMoDto paginationResourceVaRuTrMo) {
		final ModelBuilder modelBuilder = ModelBuilderUtils
				.newModelBuilder(new ModelArgs(paginationResourceVaRuTrMo));

		return this.paginationForMapList("authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForObject",
				"authority/resourceVaRuTrMo/selectResourceVaRuTrMoBy1ForMappedObjectList",
				paginationResourceVaRuTrMo.getPaginationNo(), paginationResourceVaRuTrMo.getPaginationSize(),
				modelBuilder.build());
	}

	@Override
	public int insertResourceVaRuTrMoLoBy1(ResourceVaRuTrMoLoDto insertResourceVaRuTrMoLo,
			String... insertProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.INSERT,
				insertResourceVaRuTrMoLo, insertProperties));
		return this.update("authority/resourceVaRuTrMoLo/insertResourceVaRuTrMoLoBy1", modelBuilder.build());
	}

	@Override
	public int deleteResourceVaRuTrMoLoBy1(ResourceVaRuTrMoLoDto deleteResourceVaRuTrMoLo,
			String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(deleteResourceVaRuTrMoLo,
				whereEqProperties));

		return this.update("authority/resourceVaRuTrMoLo/deleteResourceVaRuTrMoLoBy1", modelBuilder.build());
	}

	@Override
	public int updateResourceVaRuTrMoLoBy1(ResourceVaRuTrMoLoDto updateResourceVaRuTrMoLo,
			String[] updateProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(ModelBuilder.UPDATE,
				updateResourceVaRuTrMoLo, updateProperties), new ModelArgs(updateResourceVaRuTrMoLo,
				whereEqProperties));

		return this.update("authority/resourceVaRuTrMoLo/updateResourceVaRuTrMoLoBy1", modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoLoBy1ForObject(Class<R> requiredType,
			ResourceVaRuTrMoLoDto selectResourceVaRuTrMoLo, String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMoLo,
				whereEqProperties));

		return this.selectForObject(requiredType,
				"authority/resourceVaRuTrMoLo/selectResourceVaRuTrMoLoBy1ForObject", objectId, modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoLoBy1ForObjectList(Class<R> requiredType,
			ResourceVaRuTrMoLoDto selectResourceVaRuTrMoLo, String objectId, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMoLo,
				whereEqProperties));

		return this.selectForObjectList(requiredType,
				"authority/resourceVaRuTrMoLo/selectResourceVaRuTrMoLoBy1ForObject", objectId, modelBuilder.build());
	}

	@Override
	public <R> R selectResourceVaRuTrMoLoBy1ForMappedObject(Class<R> mappedClass,
			ResourceVaRuTrMoLoDto selectResourceVaRuTrMoLo, String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMoLo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObject(mappedClass,
				"authority/resourceVaRuTrMoLo/selectResourceVaRuTrMoLoBy1ForMappedObjectList", modelBuilder.build());
	}

	@Override
	public <R> List<R> selectResourceVaRuTrMoLoBy1ForMappedObjectList(Class<R> mappedClass,
			ResourceVaRuTrMoLoDto selectResourceVaRuTrMoLo, String[] selectProperties, String... whereEqProperties) {
		final ModelBuilder modelBuilder = ModelBuilderUtils.newModelBuilder(new ModelArgs(selectResourceVaRuTrMoLo,
				whereEqProperties));

		modelBuilder.putTrueExtend(ModelBuilder.SELECT, selectProperties);

		return this.selectForMappedObjectList(mappedClass,
				"authority/resourceVaRuTrMoLo/selectResourceVaRuTrMoLoBy1ForMappedObjectList", modelBuilder.build());
	}
}